package com.joysuch.wwyt.screen.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.joysuch.wwyt.core.common.util.MapUtils;
import com.joysuch.wwyt.core.exception.ApiBusinessException;
import com.joysuch.wwyt.screen.dto.ScreenMapFactoryConfigDTO;
import com.joysuch.wwyt.screen.dto.ScreenMapFactoryPointsDTO;
import com.joysuch.wwyt.screen.entity.ScreenMapFactoryConfig;
import com.joysuch.wwyt.screen.vo.ScreenMapFactoryConfigVO;

import java.util.List;

/**
 * @Author ZhaoQiuWei
 * @Date 2023/5/6 10:34
 */
public interface ScreenMapFactoryConfigService extends IService<ScreenMapFactoryConfig> {

    /**
     * 保存
     *
     * @param dto
     * @return
     * @throws ApiBusinessException
     */
    Long addOrUpdate(ScreenMapFactoryConfigDTO dto) throws ApiBusinessException;

    /**
     * 列表信息
     *
     * @return
     */
    List<ScreenMapFactoryConfigVO> getList(String orgCode,Long tenentId);

    /**
     * 删除
     *
     * @param id
     */
    void delete(Long id);

    /**
     * 根据点位信息获取分厂buildingId
     *
     * @param dto
     * @return
     */
    String getBuildingIdByLocation(ScreenMapFactoryPointsDTO dto);

    /**
     * 读取地图点位信息
     *
     * @param buildingId 建筑id
     * @return
     * @throws Exception
     */
    MapUtils.SafetyPoints getMapPoints(String buildingId) throws Exception;

    /**
     * 设置顺序
     * @param upId
     * @param downId
     */
    void editOrder(Long upId, Long downId);
}
